package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author du
 * date 2018/7/29 下午7:09
 */
public class SlideEntity implements Parcelable{
    /**
     * title : 机器人集结高交会 新三板企业亮出新产品
     * pic : Slide/2017/5a128c10c8dd7.jpg
     * url : http://j.cn/news/a11.html
     */

    private String title;//标题
    private String pic;//图片地址（上线后会自动补全绝对地址）
    private String url;//链接地址（待完善）

    public String getTitle() { return title;}

    public void setTitle(String title) { this.title = title;}

    public String getPic() { return pic;}

    public void setPic(String pic) { this.pic = pic;}

    public String getUrl() { return url;}

    public void setUrl(String url) { this.url = url;}

    @Override
    public String toString() {
        return pic;
    }

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.pic);
        dest.writeString(this.url);
    }

    public SlideEntity() {}

    protected SlideEntity(Parcel in) {
        this.title = in.readString();
        this.pic = in.readString();
        this.url = in.readString();
    }

    public static final Creator<SlideEntity> CREATOR = new Creator<SlideEntity>() {
        @Override
        public SlideEntity createFromParcel(Parcel source) {return new SlideEntity(source);}

        @Override
        public SlideEntity[] newArray(int size) {return new SlideEntity[size];}
    };
}
